package com.ymatou.iapi.godmch.service;

import java.util.ArrayList;
import java.util.List;



import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.godmch.parameter.AgentTypeVo;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*批量查询代理返佣比例Call
*FreeMaker Template自动生成代码
*/
public class getAgentRebateRateCall extends YmatouBaseCall{
	private static String opurl ="api/agent/getAgentRebateRate";
	
	public getAgentRebateRateCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	 public String getStatus1()
	 {
		 return getString("status");
	 }
	 public String getMessage()
	 {
		 return getString("msg");
	 }
	 public String getResult()
	 {
		 return getString("result");
	 }
	 
	 
	 
	 public JSONArray getRebateRateList() throws JSONException
		{
		 JSONArray infos=new JSONArray();
		  try{
			  //infos =  new Gson().fromJson(new JSONObject(getJsonObject().get("result").toString()).getJSONArray("rebateRateList"));
			  infos =  new JSONObject(getJsonObject().get("result").toString()).getJSONArray("rebateRateList");
		} catch (Exception e) {
			
		}
		  return infos;
		}
}